package com.core.reach.cloudhub.controller;

import com.core.reach.cloudhub.domain.CommonResult;
import com.core.reach.cloudhub.domain.Order;
import com.core.reach.cloudhub.service.OrderService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author ga.zhang
 * @version V1.0
 * @description: TODO
 * @date 2020/4/1 10:16
 **/
@RestController
public class OrderController {

    @Resource
    private OrderService orderService;

    @GetMapping("/order/create")
    public CommonResult<Boolean> createOrder(Order order) {
        Boolean isSuccess = orderService.createOrder(order);
        return new CommonResult(200, "下单成功", isSuccess);
    }

}
